﻿using System;

using System.Collections.Generic;
using System.Text;
using Silvermoon.Controls;
using System.Drawing;
using Silvermoon.Shapes;
using Silvermoon.OpenGL.Native;

namespace Silvermoon.Windows.Styles
{
    public class MetroButtonStyle : StyleBase
    {
        public override void Apply(Control c)
        {
            Button button = (Button)c;
            if (button.Background == null) button.Background = Color.Transparent;
            //if (button.Chrome == null) button.Chrome = new RectBorderShape { Color = Color.White };
            if (button.Chrome == null) button.Chrome = new BorderShape(3, GlColor.FromArgb(255, 255, 255, 255));
            if (button.Color.IsEmpty) button.Color = Color.Transparent;
            if (!button.HasStateManager) button.StateManager = ButtonStateManagers.MetroStateManager;

        }

        public static readonly MetroButtonStyle Instance = new MetroButtonStyle();
    }
}
